You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🔴 Bug: Undefined Variables — sum and a are used without initialization or declaration.
Suggestion: Initialize sum = 0 before the loop and either pass a as a script argument or define it locally. Using add(nil, a) will likely crash or produce unexpected results.
🟡 Suggestion: Clarify Loop Bounds — for i = 0, 3 is ambiguous regarding inclusivity.
Suggestion: If the language supports it, use explicit syntax (e.g., 0..3 or 0 to 3) or add a comment indicating whether 3 is included in the iteration count.
💭 Nit: Comment Accuracy — Comment states 内层depth=1, but the code shows two levels of nesting.
Suggestion: Update comment to reflect actual nesting depth (likely 2) or clarify if depth counting excludes the root level.
📁 examples/cfg/unreachable.dsl
🟡 未声明变量 a, b — 这两行直接使用但从未定义。如果 DSL 没有全局隐式变量约定,示例将无法通过类型检查,读者难以判断意图。
Suggestion: 添加 a = ... / b = ... 的声明,或加注释说明假设来源。
🟡 变量名 dead 与概念混淆 — 注释已经说明"死代码",再用 dead 作为变量名会让读者困惑:这行是故意命名为 dead 还是语义标注。
Suggestion: 改为 result2 = mul(a, b) 或 extra = mul(a, b)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sorry to rushing to hit the ddl qwq